load("@rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "client",
    srcs = [
        "admin.go",
        "auth.go",
        "client.go",
        "debug.go",
        "health.go",
        "option.go",
        "pfs.go",
        "pfs_file.go",
        "portforwarder.go",
        "pps.go",
        "proxy.go",
        "task.go",
        "transaction.gen.go",
        "transaction.go",
        "version.go",
    ],
    importpath = "github.com/pachyderm/pachyderm/v2/src/client",
    visibility = ["//visibility:public"],
    deps = [
        "//src/admin",
        "//src/auth",
        "//src/debug",
        "//src/enterprise",
        "//src/identity",
        "//src/internal/collection",
        "//src/internal/config",
        "//src/internal/errors",
        "//src/internal/errutil",
        "//src/internal/grpcutil",
        "//src/internal/log",
        "//src/internal/pctx",
        "//src/internal/storage/renew",
        "//src/internal/tls",
        "//src/internal/tracing",
        "//src/license",
        "//src/logs",
        "//src/metadata",
        "//src/pfs",
        "//src/pjs",
        "//src/pps",
        "//src/proxy",
        "//src/snapshot",
        "//src/storage",
        "//src/task",
        "//src/transaction",
        "//src/version",
        "//src/version/versionpb",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:meta",
        "@io_k8s_client_go//kubernetes",
        "@io_k8s_client_go//kubernetes/typed/core/v1:core",
        "@io_k8s_client_go//plugin/pkg/client/auth",
        "@io_k8s_client_go//rest",
        "@io_k8s_client_go//tools/portforward",
        "@io_k8s_client_go//transport/spdy",
        "@org_golang_google_grpc//:grpc",
        "@org_golang_google_grpc//codes",
        "@org_golang_google_grpc//credentials",
        "@org_golang_google_grpc//credentials/insecure",
        "@org_golang_google_grpc//encoding/gzip",
        "@org_golang_google_grpc//health/grpc_health_v1",
        "@org_golang_google_grpc//keepalive",
        "@org_golang_google_grpc//metadata",
        "@org_golang_google_grpc//status",
        "@org_golang_google_protobuf//types/known/durationpb",
        "@org_golang_google_protobuf//types/known/emptypb",
        "@org_golang_google_protobuf//types/known/timestamppb",
        "@org_golang_google_protobuf//types/known/wrapperspb",
        "@org_uber_go_zap//:zap",
        "@org_uber_go_zap//zapcore",
        "@org_uber_go_zap//zapio",
    ],
)

go_test(
    name = "client_test",
    size = "small",
    srcs = ["client_test.go"],
    embed = [":client"],
    deps = [
        "//src/internal/grpcutil",
        "//src/pfs",
        "@org_golang_google_grpc//:grpc",
    ],
)
